import { $rp } from '@/utils/constants';

export const formatInvite = invite => ({
  id: invite.id,

  communityId: invite.community_id,
  communityTitle: invite.community_title,
  communityUrl: `/${$rp.COMMUNITIES}/${invite.community_id}`,

  created_at: invite.created_at,
  updated_at: invite.updated_at,
});

export const formatInvites = invites => invites.map(invite => formatInvite(invite));
